Telegram Group & Telegram Channel
Что выведет данный код при запуске на Python 3.10+ (например, 3.11)?

📌 Подсказка: Обратите внимание на порядок проверок, на то, какие атрибуты попадают в others, и на использование __match_args__.

Ответ:

Automatic mode
Mode manual, другие ключи: ['threshold', 'debug']
Низкий порог 0
Краткое пояснение:

Для первого объекта (mode="auto", threshold=10) срабатывает первый case Config(mode="auto") → Automatic mode.

Для второго (mode="manual", threshold=5, debug=True) первый не совпадает, второй с threshold.

@Python_Community_ru



tg-me.com/Python_Community_ru/2585
Create:
Last Update:

Что выведет данный код при запуске на Python 3.10+ (например, 3.11)?

📌 Подсказка: Обратите внимание на порядок проверок, на то, какие атрибуты попадают в others, и на использование __match_args__.

Ответ:

Automatic mode
Mode manual, другие ключи: ['threshold', 'debug']
Низкий порог 0
Краткое пояснение:

Для первого объекта (mode="auto", threshold=10) срабатывает первый case Config(mode="auto") → Automatic mode.

Для второго (mode="manual", threshold=5, debug=True) первый не совпадает, второй с threshold.

@Python_Community_ru

BY Python Community




Share with your friend now:
tg-me.com/Python_Community_ru/2585

View MORE
Open in Telegram


Python Community Telegram | DID YOU KNOW?

Date: |

The S&P 500 slumped 1.8% on Monday and Tuesday, thanks to China Evergrande, the Chinese property company that looks like it is ready to default on its more-than $300 billion in debt. Cries of the next Lehman Brothers—or maybe the next Silverado?—echoed through the canyons of Wall Street as investors prepared for the worst.

Dump Scam in Leaked Telegram Chat

A leaked Telegram discussion by 50 so-called crypto influencers has exposed the extraordinary steps they take in order to profit on the back off unsuspecting defi investors. According to a leaked screenshot of the chat, an elaborate plan to defraud defi investors using the worthless “$Few” tokens had been hatched. $Few tokens would be airdropped to some of the influencers who in turn promoted these to unsuspecting followers on Twitter.

Python Community from id


Telegram Python Community
FROM USA